define(['jquery'], function ($) {

	var logOut = function () {
		try {
			$('#logOut')[0].addEventListener('touchend', function () {
				// 发送未登录页面
				require(['jquery', 'text!./login/login.html', 'css!./login/css/login.css', 'loginjs', 'cookie'], function ($, html, css, loginjs, cookie) {
						$('#wrap').html(html);
						loginjs.login();
						// 清除cookie
						cookie.setCookie('username', '', -1);
						cookie.setCookie('password', '', -1);
						// 购物车角标不显示
						$('#count').css('display', 'none');
					});
			});
		} catch (e) {
			// console.log(e);
		}
 	}

	return {
		logOut: logOut
	}

});